package com.mentalhealthplatform.global.rbac.dto.request;

import com.mentalhealthplatform.utils.decryptUtils.field.Decrypt;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.Pattern;
import jakarta.validation.constraints.Size;
import lombok.Getter;
import lombok.Setter;

@Setter
@Getter
public class UserRegistrationRequest {

    @Decrypt
    @NotBlank(message = "用户名不能为空")
    @Size(min = 3, max = 20, message = "用户名长度应在3到10个字符之间")
    @Pattern(regexp = "^[a-zA-Z0-9]+$", message = "用户名只能包含字母和数字")
    private String username;

    @Decrypt
    @NotBlank(message = "密码不能为空")
    @Size(min = 6, max = 15, message = "密码长度应在6到15个字符之间")
    @Pattern(regexp = "^[a-zA-Z0-9!@#$%^&*()_+\\[\\]{};':\"\\\\|,.<>/?-]+$", message = "密码包含不支持的字符")
    private String password;



}
